From: Andrew Cooper Date: Fri, 20 Jan 2017 13:58:44 +0000 (+0000) Subject: x86/cpuid: Remove the legacy path handling extd leaves X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~2893 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=06348811b63e82f9aa0df4d4b44f1f7f2bb2418a;p=xen.git x86/cpuid: Remove the legacy path handling extd leaves All leaves in the extd union are handled in guest_cpuid() now, so remove legacy handling. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c index 97a3dd4473..e0a387ec70 100644 --- a/xen/arch/x86/cpuid.c +++ b/xen/arch/x86/cpuid.c @@ -744,7 +744,7 @@ static void pv_cpuid(uint32_t leaf, uint32_t subleaf, struct cpuid_leaf *res) case 0x2 ... 0x3: case 0x7 ... 0x9: case 0xc ... XSTATE_CPUID: - case 0x80000000 ... 0x8000001c: + case 0x80000000 ... 0xffffffff: ASSERT_UNREACHABLE(); /* Now handled in guest_cpuid(). */ } @@ -826,7 +826,7 @@ static void hvm_cpuid(uint32_t leaf, uint32_t subleaf, struct cpuid_leaf *res) case 0x2 ... 0x3: case 0x7 ... 0x9: case 0xc ... XSTATE_CPUID: - case 0x80000000 ... 0x8000001c: + case 0x80000000 ... 0xffffffff: ASSERT_UNREACHABLE(); /* Now handled in guest_cpuid(). */ } @@ -904,15 +904,7 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf, ARRAY_SIZE(p->extd.raw) - 1) ) return; - switch ( leaf ) - { - default: - goto legacy; - - case 0x80000000 ... 0x8000001c: - *res = p->extd.raw[leaf & 0xffff]; - break; - } + *res = p->extd.raw[leaf & 0xffff]; break; default: diff --git a/xen/include/asm-x86/cpuid.h b/xen/include/asm-x86/cpuid.h index 6cc23aa5a3..bc3fc7c802 100644 --- a/xen/include/asm-x86/cpuid.h +++ b/xen/include/asm-x86/cpuid.h @@ -78,7 +78,7 @@ struct cpuid_policy * Global *_policy objects: * * - Guest accurate: - * - All of the feat and xstate unions + * - All of the feat, xstate and extd unions * - max_{,sub}leaf * - All FEATURESET_* words * - Short vendor infomation @@ -86,7 +86,7 @@ struct cpuid_policy * Per-domain objects: * * - Guest accurate: - * - All of the feat and xstate unions + * - All of the feat, xstate and extd unions * - max_{,sub}leaf * - All FEATURESET_* words * - Short vendor infomation